home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Hyper / M-Md / MathTutor.cpt / Math / card_2404.txt < prev    next >
Encoding:
Text File  |  1990-08-02  |  3.4 KB  |  146 lines

  1. -- card: 2404 from stack: in
  2. -- bmap block id: 2888
  3. -- flags: 0000
  4. -- background id: 2580
  5. -- name: scoreCard
  6.  
  7.  
  8. -- part 1 (field)
  9. -- low flags: 01
  10. -- high flags: 0002
  11. -- rect: left=52 top=60 right=323 bottom=89
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 3
  16. -- text size: 10
  17. -- style flags: 256
  18. -- line height: 13
  19. -- part name: Individual
  20.  
  21.  
  22. -- part 2 (field)
  23. -- low flags: 01
  24. -- high flags: 0002
  25. -- rect: left=192 top=128 right=148 bottom=238
  26. -- title width / last selected line: 0
  27. -- icon id / first selected line: 0 / 0
  28. -- text alignment: 1
  29. -- font id: 3
  30. -- text size: 12
  31. -- style flags: 256
  32. -- line height: 16
  33. -- part name: Correct
  34.  
  35.  
  36. -- part 3 (field)
  37. -- low flags: 01
  38. -- high flags: 0002
  39. -- rect: left=282 top=128 right=148 bottom=328
  40. -- title width / last selected line: 0
  41. -- icon id / first selected line: 0 / 0
  42. -- text alignment: 1
  43. -- font id: 3
  44. -- text size: 12
  45. -- style flags: 256
  46. -- line height: 16
  47. -- part name: Percent
  48.  
  49.  
  50. -- part 4 (field)
  51. -- low flags: 01
  52. -- high flags: 0002
  53. -- rect: left=234 top=175 right=195 bottom=280
  54. -- title width / last selected line: 0
  55. -- icon id / first selected line: 0 / 0
  56. -- text alignment: 1
  57. -- font id: 3
  58. -- text size: 12
  59. -- style flags: 256
  60. -- line height: 16
  61. -- part name: Grade
  62.  
  63.  
  64. -- part 5 (button)
  65. -- low flags: 00
  66. -- high flags: 8003
  67. -- rect: left=208 top=278 right=300 bottom=308
  68. -- title width / last selected line: 0
  69. -- icon id / first selected line: 0 / 0
  70. -- text alignment: 1
  71. -- font id: 0
  72. -- text size: 12
  73. -- style flags: 0
  74. -- line height: 16
  75. -- part name: OK
  76. ----- HyperTalk script -----
  77. on mouseUp
  78.   global quizTotal
  79.   if quizTotal = 0 then
  80.     put empty into cd fld "Individual"
  81.     lock screen
  82.     go card "testCard"
  83.     show btn "Begin Quiz"
  84.     show cd fld cover
  85.     show cd fld fracCover
  86.     go card "scoreCard"
  87.     unlock screen
  88.   end if
  89.   visual wipe left
  90.   go card "testCard"
  91.   if quizTotal = 0 then showButtons
  92. end mouseUp
  93.  
  94.  
  95.  
  96. -- part 6 (button)
  97. -- low flags: 00
  98. -- high flags: 8003
  99. -- rect: left=208 top=237 right=259 bottom=308
  100. -- title width / last selected line: 0
  101. -- icon id / first selected line: 0 / 0
  102. -- text alignment: 1
  103. -- font id: 0
  104. -- text size: 12
  105. -- style flags: 0
  106. -- line height: 16
  107. -- part name: Compute
  108. ----- HyperTalk script -----
  109. on mouseUp
  110.   set numberFormat to "#.##"
  111.   if cd fld "Individual" is empty then exit mouseUp
  112.   put empty into totalScore
  113.   repeat with x = 1 to 20
  114.     add line x of cd fld "Individual" to totalScore
  115.   end repeat
  116.   put totalScore into cd fld "Correct"
  117.   put cd fld "Correct"/the number of lines in cd fld "Individual"*10 & "%" into cd fld "Percent"
  118.   put cd fld "Correct"/the number of lines in cd fld "Individual"*10 into pct
  119.   if pct < 101 then put "A+" into cd fld "Grade"
  120.   if pct < 98 then put "A" into cd fld "Grade"
  121.   if pct < 93 then put "A-" into cd fld "Grade"
  122.   if pct < 90 then put "B+" into cd fld "Grade"
  123.   if pct < 87 then put "B" into cd fld "Grade"
  124.   if pct < 83 then put "B-" into cd fld "Grade"
  125.   if pct < 80 then put "C+" into cd fld "Grade"
  126.   if pct < 77 then put "C" into cd fld "Grade"
  127.   if pct < 73 then put "C-" into cd fld "Grade"
  128.   if pct < 70 then put "D+" into cd fld "Grade"
  129.   if pct < 67 then put "D" into cd fld "Grade"
  130.   if pct < 63 then put "D-" into cd fld "Grade"
  131.   if pct < 60 then put "F" into cd fld "Grade"
  132. end mouseUp
  133.  
  134.  
  135.  
  136. -- part contents for card part 2
  137. ----- text -----
  138. 9
  139.  
  140. -- part contents for card part 3
  141. ----- text -----
  142. 90%
  143.  
  144. -- part contents for card part 4
  145. ----- text -----
  146. A-